﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WoWAPI
{
	public class Class
	{
		private const string CLASS_URL = "http://{0}.battle.net/api/wow/data/character/classes";

		public int ID { get; set; }
		public int Mask { get; set; }
		public string PowerType { get; set; }
		public string Name { get; set; }

		public Class() { }

		public static Class[] GetClasses(string Region)
		{
			return API.DeserializeJSON<ClassCollection>(API.MakeWebRequest(String.Format(CLASS_URL, Region))).Classes;
		}

		private class ClassCollection
		{
			public Class[] Classes { get; set; }

			public ClassCollection() { }
		}
	}
}
